import 'package:flu_framework/common/base/BaseWidget.dart';
import 'package:flu_framework/common/channel/pay/pay_channel.dart';
import 'package:flutter/material.dart';

class PayPage extends BaseWidget {
  const PayPage({super.key});

  @override
  BaseWidgetState<BaseWidget> getState()  => _PayPageState();
}

class _PayPageState extends BaseWidgetState<PayPage> {

  late PayChannel _payChannel;
  @override
  void initState() {
    super.initState();
    _payChannel = PayChannel();
  }
  @override
  String setPageTitle() => "支付页面";

  @override
  Widget buildContent() {
    return Center(
      child: Column(
        children: [
          ElevatedButton(
            onPressed: (){
              _payChannel.wxPay("wxInfo");
            },
            child: Text("微信支付"),
          ),
          ElevatedButton(
            onPressed: (){
              _payChannel.zfbPay("zfbInfo");
            },
            child: Text("支付宝支付"),
          ),
        ],
      ),
    );
  }


}
